import request from '@/utils/campRequest'

// 1.营地设置开始
// 上传登录页背景图
export function UploadBgImage(query) {
  return request({
    url: '/modules-campsite/conf/uploadImage',
    method: 'post',
    params: query
  })
}

// 上传系统logo
export function UploadLogo(query) {
  return request({
    url: '/modules-campsite/conf/uploadLogo',
    method: 'post',
    params: query
  })
}

// 获取营地列表
export function GetCampList(query) {
  return request({
    url: '/modules-campsite/conf/SecondList',
    method: 'get',
    params: query
  })
}

// 获取指定营地报名人数
export function GetSignUpCount(query) {
  return request({
    url: '/modules-campsite/conf/chakanbaoming',
    method: 'get',
    params: query
  })
}

// 创建营地
export function CreateCamp(query) {
  return request({
    url: '/modules-campsite/conf',
    method: 'post',
    data: query
  })
}

// 更新（编辑）营地
export function EditCamp(query) {
  return request({
    url: '/modules-campsite/conf',
    method: 'put',
    data: query
  })
}

// 获取指定营地详情
export function GetCampInfo(id) {
  return request({
    url: `/modules-campsite/conf/${id}`,
    method: 'get'
  })
}

// 删除指定营地
export function RemoveCamp(id) {
  return request({
    url: `/modules-campsite/conf/${id}`,
    method: 'delete'
  })
}

// 开启/关闭营地-0关闭，1开启
export function ChangeCampStatus(query) {
  return request({
    url: '/modules-campsite/conf/kaiqi',
    method: 'get',
    params: query
  })
}
// 1.营地设置结束


// 2.查看报名开始
// 筛选查询省份
export function GetProvinceList() {
  return request({
    url: '/modules-campsite/selectProvinceNameAndId',
    method: 'get',
  })
}

// 筛选查询城市
export function GetCityList(provinceId) {
  return request({
    url: `/modules-campsite/listCity?provinceId=${provinceId}`,
    method: 'get',
  })
}

// 筛选查询中学
export function GetSchool(cityId) {
  return request({
    url: `/modules-campsite/listSchool?cityId=${cityId}`,
    method: 'get'
  })
}

// 获取营地报名列表
export function GetSignUpList(query) {
  return request({
    url: '/modules-campsite/conf/chaXun',
    method: 'get',
    params: query
  })
}
// 2.查看报名结束


// 3.审核资料开始
// 获取待审核列表
export function GetDaiCheckList(query) {
  return request({
    url: '/modules-campsite/conf/daishenghe',
    method: 'get',
    params: query
  })
}

// 获取审核通过列表
export function GetYesCheckList(query) {
  return request({
    url: '/modules-campsite/conf/shenghetongguochaxun',
    method: 'get',
    params: query
  })
}

// 获取审核未通过列表
export function GetNoCheckList(query) {
  return request({
    url: '/modules-campsite/conf/shenghebutongguo',
    method: 'get',
    params: query
  })
}

// 获取当前审核报名资料详情
export function GetCheckInfo(query) {
  return request({
    url: '/modules-campsite/conf/dangeshenghe',
    method: 'get',
    params: query
  })
}

// 当前审核不通过原因提交-不通过
export function CheckFailReason(query) {
  return request({
    url: '/modules-campsite/conf/failshenghe',
    method: 'post',
    params: query
  })
}

// 审核报名资料-通过
export function CheckSignUpInfo(query) {
  return request({
    url: '/modules-campsite/conf/shenghe',
    method: 'post',
    params: query
  })
}
// 3.审核资料结束


// 4.邀请码管理开始
// 获取指定营地邀请码筛选列表
export function GetInviteQuery(data) {
  return request({
    url: `/modules-campsite/code/names`,
    method: 'get',
    params: data
  })
}

// 获取营地邀请码列表
export function GetInviteList(query) {
  return request({
    url: '/modules-campsite/code/list',
    method: 'get',
    params: query
  })
}

// 添加营地邀请码
export function AddInvite(query) {
  return request({
    url: '/modules-campsite/code',
    method: 'post',
    data: query
  })
}
// 追加营地邀请码
export function AppendInvite(query) {
  return request({
    url: '/modules-campsite/code/append',
    method: 'post',
    data: query
  })
}
// 4.邀请码管理结束

// 5.经销商管理开始
// 获取经销商列表
export function GetAgencyList(query) {
  return request({
    url: '/modules-campsite/distribution/list',
    method: 'get',
    params: query
  })
}
// 获取指定经销商详情
export function GetAgencyInfo(uuid) {
  return request({
    url: '/modules-campsite/distribution/'+uuid,
    method: 'get'
  })
}

// 新增经销商
export function CreateAgency(query) {
  return request({
    url: '/modules-campsite/distribution',
    method: 'post',
    data: query
  })
}

// 编辑（修改）经销商
export function EditAgency(query) {
  return request({
    url: '/modules-campsite/distribution',
    method: 'put',
    data: query
  })
}
// 删除指定经销商-(单个、批量)
export function RemoveAgency(uuids) {
  return request({
    url: '/modules-campsite/distribution/'+uuids,
    method: 'delete'
  })
}
// 5.经销商管理结束

// 6.作业管理开始
// 获取作业列表
export function GetJobList(query) {
  return request({
    url: '/modules-campsite/teacher/list',
    method: 'get',
    params: query
  })
}

// 获取指定作业详情
export function GetJobInfo(id) {
  return request({
    url: '/modules-campsite/teacher/'+id,
    method: 'get'
  })
}

// 新增作业
export function CreateJob(query) {
  return request({
    url: '/modules-campsite/teacher',
    method: 'post',
    data: query
  })
}

// 编辑（修改）作业
export function EditJob(query) {
  return request({
    url: '/modules-campsite/teacher/Update',
    method: 'post',
    data: query
  })
}

// 删除作业
export function RemoveJob(query) {
  return request({
    url: '/modules-campsite/teacher/NewDelete',
    method: 'post',
    data: query
  })
}

// 评阅-获取未提交列表
export function GetNotSubmitList(query) {
  return request({
    url: '/modules-campsite/ld/NewWeiTiJiao',
    method: 'get',
    params: query
  })
}
// 评阅-获取未评阅列表
export function GetNotReadList(query) {
  return request({
    url: '/modules-campsite/ld/weipingyue',
    method: 'get',
    params: query
  })
}
// 评阅-获取已评阅列表
export function GetYiReadList(query) {
  return request({
    url: '/modules-campsite/ld/yipingyue',
    method: 'get',
    params: query
  })
}

// 未评阅-获取学生答案
export function GetStuWork(query) {
  return request({
    url: '/modules-campsite/ld/StuWork',
    method: 'get',
    params: query
  })
}

// 未评阅-获取下一个学生的作业
export function GetNextStuWork(query) {
  return request({
    url: '/modules-campsite/ld/YiPingXiaYiTiao',
    method: 'get',
    params: query
  })
}

// 未评阅-保存当前评论
export function SaveTheRead(query) {
  return request({
    url: '/modules-campsite/ld/PingYueWork',
    method: 'post',
    params: query
  })
}

// 已评阅-回屏回显
export function GetAllReadInfo(query) {
  return request({
    url: '/modules-campsite/ld/HuiPingHuiXian',
    method: 'get',
    params: query
  })
}

// 已评阅-保存
export function SaveYiRead(query) {
  return request({
    url: '/modules-campsite/ld/HuiPingWork',
    method: 'post',
    params: query
  })
}

// 6.作业管理结束

// 7.消息通知开始
// 获取学生状态
export function GetStuStatusList(query) {
  return request({
    url: '/modules-campsite/email/ChaXunIsShengHe',
    method: 'get',
    params: query
  })
}
// 邮箱-发送
export function sendMessage(query) {
  return request({
    url: '/modules-campsite/email/sendMessage',
    method: 'post',
    params: query
  })
}

// 短信-发送
export function sendShortNote(query) {
  return request({
    url: '/modules-campsite/email/SendMessage',
    method: 'post',
    params: query
  })
}

// 7.消息通知结束


